#include "SEL.h"

using namespace SEL;

int main()
{

	try
	{
		FileRWops ops ("testseek", "rb");
		ops.setVirtualBegin (5);
		ops.setVirtualSize (16);
		ops.seek (0);
		char str[37];
		std::cout << ops.read (str, 1, 10) << std::endl;
		std::cout << ops.read (str+10, 1, 10) << std::endl;
		str[sizeof(str)-1] = 0;
		str[16]=0;
		std::cout << str << std::endl;
		ops.close ();

#if 0
		FileRWops *_ops = new FileRWops ("testread", "rb");

		char ch;
		ch = _ops->getChar ();
		while (_ops->status () == RWops::STAT_OK)
		{
			cout << (int)ch << ',' << ch << endl;
			ch = _ops->getChar ();
		}
		cout << "." << endl;
		delete _ops;
#endif
	}
	catch (Error error)
	{
		std::cout << "Excpetion caught: " << error.str () << std::endl;
	}

	return 0;
}
